#!/bin/bash

groupadd backend
groupadd web-project

useradd -m -g web-project -G backend tom
useradd -m -g web-project alice

id tom
id alice

grep 'backend' /etc/group
grep 'web-project' /etc/group

mkdir -p /home/ares_project
chown -R tom:web-project /home/ares_project

find /home/ares_project -type d -exec chmod 775 {} +
chmod 775 /home/ares_project

find /home/ares_project -type f -exec chmod 664 {} +

ls -ld /home/ares_project
ls -l /home/ares_project
